data segment	
sum	dw	0
data ends

stack	segment stack
	db	200	dup(0)
stack	ends

code	segment
	assume ds:data, ss:stack, cs:code
	
start:
	mov	ax,	data
	mov	ds,	ax
	mov	cx,	50
	mov	ax,	0
	mov	bx,	1
	
next:	and	ax, 	bx
	inc	bx
	inc	bx
	dec	cx
	jne	next
	mov	sum,	ax
	mov	ah, 	4ch
	int	21h
code	ends

	end start